import request from '@/utils/request'

// 查询导师列表
export function listInstructor(query) {
  return request({
    url: '/mentor/instructor/list',
    method: 'get',
    params: query
  })
}

// 查询已经审核通过的导师列表
export function listInstructorAccepted(query) {
  return request({
    url: '/mentor/instructor/accepted/list',
    method: 'get',
    params: query
  })
}

// 查询导师详细
export function getInstructor(id) {
  return request({
    url: '/mentor/instructor/' + id,
    method: 'get'
  })
}

// 新增导师
export function addInstructor(data) {
  return request({
    url: '/mentor/instructor',
    method: 'post',
    data: data
  })
}

// 修改导师
export function updateInstructor(data) {
  return request({
    url: '/mentor/instructor',
    method: 'put',
    data: data
  })
}

// 删除导师
export function delInstructor(id) {
  return request({
    url: '/mentor/instructor/' + id,
    method: 'delete'
  })
}

// 导出导师
export function exportInstructor(query) {
  return request({
    url: '/mentor/instructor/export',
    method: 'get',
    params: query
  })
}

//添加导师详细信息
export function addInstructorDetail(insFormData) {
  return request({
    url: '/mentor/instructor/addInstructorDetail',
    method: 'post',
    data: insFormData
  })
}

//根据用户id获取导师详细信息
export function getInstructorDetailByUserId(userId) {
  return request({
    url: '/mentor/instructor/getInstructorDetailByUserId',
    method: 'get',
    params: {userId}
  })
}

//根据导师id获取导师详细信息
export function getInstructorDetailById(insId) {
  return request({
    url: '/mentor/instructor/getInstructorDetailById',
    method: 'get',
    params: {insId}
  })
}

// 管理员审核
export function changeInstructorExamineStatus(adminName,status,insId,message) {
  return request({
    url: '/mentor/instructor/examine',
    method: 'post',
    params: {adminName,status,insId,message}
  })
}


//获取所有导师信息
export function getAllInstructor() {
  return request({
    url: '/mentor/instructor/all',
    method: 'get'
  })
}

//获取招生未招满的导师列表
export function selectNotFull() {
  return request({
    url: '/mentor/instructor/selectNotFull',
    method: 'get'
  })
}



